package com.zxy.day0624_util.utils;

import org.apache.commons.codec.digest.DigestUtils;
/**
 * @Auther: lenovo
 * @Date: 2021/9/27 20:49
 * @Description:
 */
public class MD5Util {
    private static String SALT = "zz";

    public MD5Util() {
    }

    public static String md5Hash(String password) {
        return DigestUtils.md5Hex(password + SALT);
    }

    public static String md5Hash(String password, String salt) {
        SALT = salt;
        return DigestUtils.md5Hex(password + SALT);
    }
}
